import baseRequest from './request'

// 获取 token
export function getToken({ data = {}, hasLoading = false }) {
    return baseRequest({
        url: '/connect/token',
        method: 'POST',
        header: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data,
        hasLoading,
        isGetToken: true
    })
}

// 获取用户信息
export function getUserInfo({ data = {}, hasLoading = true } = {}) {
    return baseRequest({
        url: '/Auth/LoginUser',
        method: 'GET',
        data,
        hasLoading,
        needLogin: true
    })
}